<include file="Public:header"/>


<div class="right-bord">今日概况</div>
<ul class="right-dailyBox">
    <li class="bord-yello-3"><a href="">查询量:{$query}</a><br><span>{$time}数据</span></li>
    <li class="bord-green-2"><a href="">成交量:{$confirm}</a><br><span>{$time}数据</span></li>
    <li class="bord-red-4"><a href="">成交金额:{$confirm_gold|default=0}</a><br><span>{$time}数据</span></li>
    <li class="bord-blue-1"><a href="">新增推广员:{$saler}</a><br><span>{$time}数据</span></li>
</ul>
<div class="right-bord">实时数据</div>
<div class="row">
    <div class="col-md-8">
        <div class="daily-chart" id="main">&nbsp;</div>
    </div>
    <div class="col-md-4">
        <volist name="list" id="v">
            <dl class="dl-horizontal daily-order">
                <dt>{$v.dll_ordsn}</dt>
                <dd>订单状态:<if condition="$v.dll_status gt 0">已支付<else/>未支付</if></dd>
            </dl>
        </volist>
    </div>
</div>
<script src="__PUBLIC__/libs/json2.js"></script>
<script src="__PUBLIC__/libs/echarts/echarts.js"></script>
<script>
    var category={$chart_menu};
    var nums={$chart_nums};
    var gold={$chart_gold};
    
    require.config({
        paths: {
            echarts: '__PUBLIC__/libs/echarts'
        }
    });
    require(
            [
                'echarts',
                'echarts/chart/bar',
                'echarts/chart/line'
            ],
            function (ec) {
                // 基于准备好的dom，初始化echarts图表
                var myChart = ec.init(document.getElementById('main'));

                option = {
                    title: {text: '最近1周销售数据'},
                    tooltip: {trigger: 'axis'},
                    legend: {data: ['销售量', '订单金额']},
                    toolbox: {
                        show: true,
                        feature: {
                            dataView: {show: true, readOnly: false},
                            magicType: {show: true, type: ['line', 'bar']},
                            restore: {show: true},
                            saveAsImage: {show: true}
                        }
                    },
                    calculable: true,
                    xAxis: [
                        {
                            type: 'category',
                            data: category
                        }
                    ],
                    yAxis: [{type: 'value'}],
                    series: [
                        {
                            name: '销售量',
                            type: 'bar',
                            data: nums
                        },
                        {
                            name: '订单金额',
                            type: 'line',
                            data: gold
                        }
                    ]
                };


                // 为echarts对象加载数据 
                myChart.setOption(option);
            }
    );
</script>

<include file="Public:footer"/>
